package com.curve;

import com.opensymphony.xwork.ActionSupport;
import com.service.CurveServiceFactory;
import com.lordor.om.action.AuthorizationUtil;

/**
 * User: lyj
 * Date: 2011-11-30
 * Time: 17:08:17
 */
public class CurveAction extends ActionSupport {
    private String id;
    private UserCurve uc;
    public String execute() throws Exception {
        uc= CurveServiceFactory.getCurveService().findUserCurveById(id);

        return "input";
    }
    private String title;
    public String create() throws Exception {
        uc= CurveServiceFactory.getCurveService().createUserCurve(AuthorizationUtil.getAccount(),title);

        return "success"; 
    }


    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public UserCurve getUc() {
        return uc;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }
}
